package com.navinfo.collect.fragment

import android.view.View
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.navinfo.collect.R
import com.navinfo.collect.adapter.NewDataAdapter


class NewDataFragment : BaseFragment() {


    private val textList = arrayListOf(
        "我的关注", "通知开关", "我的徽章", "意见反馈", "我要投稿",
        "我的关注", "通知开关", "我的徽章", "意见反馈", "我要投稿",
        "我的关注", "通知开关", "我的徽章", "意见反馈", "我要投稿"
    )


    override fun getLayoutRes(): Int {
        return R.layout.fragment_new_data;
    }

    private lateinit var recyclerView: RecyclerView

    override fun initView(view: View) {
        recyclerView = view.findViewById(R.id.recyclerView)
        val decoration = DividerItemDecoration(context, DividerItemDecoration.VERTICAL)
        recyclerView.addItemDecoration(decoration)
        recyclerView.layoutManager = LinearLayoutManager(context);
        val adapter = NewDataAdapter(textList);
        recyclerView.adapter = adapter;
    }
}